# 计科201132叶英杰
import random
balls=['红色']*3+['黄色']*3+['蓝色']*6
red=0
yellow=0
blue=0
times=int(input("请输入选取次数："))
for i in range(times):
    print("第%d次抽取结果为："%(i+1),end=" ")
    for i in range(8):
        choice=random.choice(balls)
        if choice=='红色':
            red+=1
        elif choice=='黄色':
            yellow+=1
        else:
            blue+=1
    print("红色球%d个，黄色球%d个，蓝色球%d个"%(red,yellow,blue))
    red = 0
    yellow = 0
    blue = 0
